package com.txtriet.businesscardcreator;

import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends Activity implements OnClickListener {
	public static final String INFO = "info";
	
	private EditText txtAddress;
	private EditText txtCompany;
	private EditText txtEmail;
	private EditText txtFax;
	private EditText txtJobTitle;
	private EditText txtName;
	private EditText txtPhone;
	private EditText txtWeb;
	private EditText txtZipCode;

	private Button btnNext;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		txtAddress = (EditText) findViewById(R.id.txtAddress);
		txtCompany = (EditText) findViewById(R.id.txtCompany);
		txtEmail = (EditText) findViewById(R.id.txtEmail);
		txtFax = (EditText) findViewById(R.id.txtFax);
		txtJobTitle = (EditText) findViewById(R.id.txtJobTitle);
		txtName = (EditText) findViewById(R.id.txtName);
		txtPhone = (EditText) findViewById(R.id.txtPhone);
		txtWeb = (EditText) findViewById(R.id.txtWeb);
		txtZipCode = (EditText) findViewById(R.id.txtZipCode);

		btnNext = (Button) findViewById(R.id.btnNext);
		btnNext.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}

	@Override
	public void onClick(View arg0) {
		// TODO Auto-generated method stub
		int id = arg0.getId();
		if (id == R.id.btnNext) {
			ArrayList<String> lstInfo = new ArrayList<String>();
			lstInfo.add(txtAddress.getText().toString());
			lstInfo.add(txtCompany.getText().toString());
			lstInfo.add(txtEmail.getText().toString());
			lstInfo.add(txtFax.getText().toString());
			lstInfo.add(txtJobTitle.getText().toString());
			lstInfo.add(txtName.getText().toString());
			lstInfo.add(txtPhone.getText().toString());
			lstInfo.add(txtWeb.getText().toString());
			lstInfo.add(txtZipCode.getText().toString());
		}
	}	
}
